//
//  CommonUtil.h
//  常用工具类
//  Created by just-bob on 13-6-8.
//  Copyright (c) 2013年 just-bob. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
//将RGB值转换UIColor
#define UIColorFromRGB(rgbValue) [UIColor \
colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

//获取Bundle包路径
#define GETBUNDLEWITHPATH(X) [NSBundle bundleWithPath: [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent: X]]


@interface StringUtil : NSObject{
    
}




//是否数字
+ (BOOL) isNumbericString:(NSString *)str;
//是否手机号码
+ (BOOL) isMobile:(NSString *)strNum;
//a-z\A-Z\!@#$&
+ (BOOL) isLimitChar:(NSString *)strNum;
//字母数字组合
+ (BOOL) isTranNum:(NSString *)strNum;
//是否身份证件号码
+ (BOOL) isCardNum:(NSString *)strNum;
//是否邮箱地址
+ (BOOL) isEmail:(NSString*)email;
//首位是否字母
+ (BOOL) isFirstChr:(NSString*)str;


//从16进制获取颜色
+ (UIColor *) getColorFromHex: (NSString *) hexColor;
//从bundle中获取图片
+ (UIImage *) getImageFromBundle:(NSString*)bundlename Name:(NSString*)name;
//从bundle配置文件中获取配置参数信息
+ (NSString*) getValueFromBundle:(NSString*)bundlename Filename:(NSString*)filename Key:(NSString*) key;

//票价
+(NSString*) getPrice:(NSString*)price Len:(NSInteger)len;
//时间
+(NSString*) getTime:(NSString*)time;
//性别 1男 0女
+(NSString*) getSex:(NSString*)flag;
//获取历时
+(NSString*) getLishi:(NSString*)min;
//身份证号码
+(NSString *)Number:(NSString *)num;


///生成UUID
+(NSString *) getUUID;
@end
